package com.example.presentation_libary.presentationViews;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;

/**
 * 辅屏内的布局基类
 */
public abstract class BasePresentionView extends FrameLayout {
    public Context mContext;
    public View rootView;
    public String json;
    public BasePresentionView(@NonNull Context context, String mjson) {
        super(context);
        mContext = context;
        json=mjson;
        initData();
    }

    private void initData() {
        initView(getLayoutId());
        initEvent();
    }

    private void initView(int layout_id) {
        rootView = LayoutInflater.from(mContext).inflate(layout_id, this);
    }

    //获取显示的 副屏布局
    public abstract int getLayoutId();

    //事件的处理
    public abstract void initEvent();


}
